package code;

public class IceCube extends MovableObject
{
	
	public IceCube(String texture)
	{
		super(texture);
	}
	
	@Override
	public Boolean attemptMove(Direction dir)
	{
		Cell next = getCurrentCell().cellAt(dir);
		Boolean hasMoved = false;
		
		while (!getCurrentCell().isEmpty() && this.canMove(dir))
		{
			this.moveTo((ContainerCell)next);
			next = next.cellAt(dir);
			hasMoved = true;
		}
		
		return hasMoved;
		
	}
	
	public boolean activatesSwitch()
	{
		return true;
	}	
}
